<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        // 时间类型转换
        const date = new Date("1999-02-28 5:33:55");
        // 获取时间戳
        // console.log(date * 1);
        // console.log(Number(date));
        // console.log(date.valueOf());
        // console.log(date.getTime());

        const timestamp = date.valueOf();
        // console.log(timestamp);
        console.log(new Date(timestamp));


    </script>
</body>

</html>